<?php
define('EmpireCMSAdmin','1');
require_once("../class/connect.php");
require_once("../class/db_sql.php");
require_once("../class/functions.php");
require_once("../class/user.php");
require_once("../class/page_obj.php");
///活动===发起人口碑

$link=db_connect();
$empire=new mysqlquery();
$act_db="phome_ecms_actives";
$reg_db="phome_jat_act_registration";
$act_id=$_REQUEST['id'];
if(!$act_id){
	echo "<div class='data-error'>系统错误</div>";
	exit();
}
$info=DbTouch($act_db,array('id'=>$act_id));
if(!$info){
	echo "<div class='data-error'>无此记录！</div>";
	exit();
}
	
	$c=DbTouch($act_db,array('id'=>$act_id));
	$app_userid=$c[userid];
	$list=DbTouchAll($act_db,array('userid'=>$app_userid)," * "," AND id!='$act_id'");
	$u=getUserInfo($app_userid);
	$head=getUserHead($u["userpic"],69,69);	
?>
<table  class="r-list" style="width:100%;">
<tr>
	<td><a href="<?=$public_r['newsurl']?>e/member/sp/?uid=<?=$app_userid?>" target='_blank'><img src="<?=$head?>" height='35'/ target='_blanck'></a><div><a href="<?=$public_r['newsurl']?>e/member/sp/?uid=<?=$app_userid?>" target='_blank'><?=$u['nickname']?></a></div></td>
	<td colspan='3'><a href="<?=$public_r['newsurl']?>e/member/sp/?uid=<?=$app_userid?>" target='_blank'><?=$u['nickname']?></a>已经成功组织过活动<?=count($list)?>个</td>
	<td></td>
</tr>
<?php
if($list){
foreach($list as $key=>$vals){
	$goodping=$vals['good_vote'];//好评；
	//print_r($vals);
?>
	<tr>
		<td></td>
		<td><?=date("Y-m-d H-i-s",$vals[truetime])?></td>
		<td><a href="<?=$public_r['newsurl']?>act/myactive/<?=$vals['newspath']?>/<?=$vals['id']?>.html"  target='_blank'><?=$vals['title']?></a></td>
		<td>好评率：<?=$goodping!=0?$goodping."%":'--'?></td>
	</tr>

<?php }?>
<?
}else{
	echo "<tr><td colspan='13' class='no-data'>这是他第一次在这里组织活动！</td></tr>";
}
?>
</table>
